-
Notifications
You must be signed in to change notification settings - Fork 225
Add configuration options for pre- and post-filters #1314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A query on the comments. O/w lgtm.
ts/core/OutputJax.ts
Outdated
@@ -47,7 +47,12 @@ export interface OutputJax<N, T, D> { | |||
options: OptionList; | |||
|
|||
/** | |||
* Lists of post-filters to call after typesetting the math | |||
* Lists of pre-filters to call after typesetting the math |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a single list not a list of lists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. The two lists used to be under one comment, but I split it for better jsdoc coverage, and neglected to fix the plural.
ts/core/OutputJax.ts
Outdated
preFilters: FunctionList; | ||
|
||
/** | ||
* Lists of post-filters to call before typesetting the math |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1314 +/- ##
===========================================
- Coverage 86.71% 86.71% -0.01%
===========================================
Files 337 337
Lines 83979 84067 +88
Branches 4750 3129 -1621
===========================================
+ Hits 72826 72900 +74
- Misses 11130 11167 +37
+ Partials 23 0 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR adds the ability to have pre- and post-filters for the input and output jax be included in their configuration objects, rather than having to use the
startup.ready()
function to add them. It also adds a pre-filter to the output jax, for symmetry (and because it may be easier to do filtering there than to have to add a post-filter onto each of the input jax if there are multiple input formats).To facilitate this, a new
addList()
method is added to theFunctionList
object, and for good measure this is used in the TeX input jax to add its filters. You can also now pass a function list to theFunctionList
constructor. A new test is added to theFunctionList
tests to cover the new code.